package com.yangj.web;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import com.yangj.dao.AccompanyingPlayDao;
import com.yangj.model.AccompanyingPlay;
import com.yangj.model.BannerImgItem;
import net.sf.json.JSONArray;
public class GetAccompanyingPlaysToGame  extends JsonServlet {
    private AccompanyingPlayDao accompanyingPlayDao = new AccompanyingPlayDao();
	@Override
	public String dealInput(Map<String, String[]> input) {
		int gameId = 1;
		if(input.get("id") != null && input.get("id")[0].matches("\\d{1,9}")) {
			gameId = Integer.parseInt(input.get("id")[0]);
		}
		List<AccompanyingPlay> servicePlayWiths=accompanyingPlayDao.getAll(gameId);
		return JSONArray.fromObject(servicePlayWiths).toString();
	}

}
